package main

import (
	"flag"
	"fmt"
	goim "github.com/cube/im"
)

var serverIp string
var serverPort int

//命令行提示 ./main -h
//命令行解析 ./main.exe -ip 127.0.0.1 -port 8888
func init() {
	flag.StringVar(&serverIp, "ip", "127.0.0.1", "server ip")
	flag.IntVar(&serverPort, "port", 8888, "server port")
}

func main() {

	//命令行解析
	flag.Parse()

	server := goim.NewServer(serverIp, serverPort)
	fmt.Println("starting im system ...")
	server.Start()
}
